_Die_AMPEL_ARD_v1.h
#ifndef _DIE_AMPEL_ARD_V1_H_
#define _DIE_AMPEL_ARD_V1_H_
/* Definitions of time constants and other factors for controlling the system */
#define GRUN_BLINK_AMOUNT 3
#define AMOUNT_OF_PHASES 5
#define RED_DELAY_MUTIPLIER GRUN_BLINK_AMOUNT*2
#define AMPEL_MAIN_TIME (uint16_t)25000
#define AMPEL_TRANSIT_TIME (uint16_t)3500
#define CLOCK_IMPULSE_PERIOD (uint16_t)600
#define CLOCK_IMP_DUTY_CYCLE (uint16_t)50
#define CLOCK_SYNCH_TIME_PERIOD (uint16_t)5000
#define ESP_RESET_TRIES (uint8_t)2
#define ESP_RESET_PRESS_DELAY (int)500
#define ESP_RESET_WAIT_DELAY (int)20000
/* Status structure for global control
* "volatile" added to prevent loosing data caused by compiler
*/
typedef struct
{
volatile unsigned Lamp_Tim_ChB_Int :1;
volatile unsigned Pins_Tim_ChB_Int :1;
volatile unsigned Clock_Tim_ChB_Int :1;
//volatile unsigned Fan_Tim_ChB_Int :1;
volatile unsigned string_received :1;
volatile unsigned post_request_received :1;
volatile unsigned post_ready_to_send;
volatile unsigned ESP_01_connected;
volatile unsigned debug_flag :1;
volatile unsigned fan_started :1;
}status_flags_t;
#endif /* _DIE_AMPEL_ARD_V1_H_ */